package com.markus.code.exam.yongyou;

/**
 * Author:markusZhang
 * Date:Create in 2020/8/18 14:46
 * todo: 上下翻转
 */
public class Main1 {
    public int[][] convert (int[][] matrix) {
        // write code here
        if (matrix == null || matrix.length == 0 || matrix[0].length == 0){
            return matrix;
        }
        int [][]res = new int[matrix.length][matrix[0].length];
        for (int i=matrix.length-1;i>=0;i--){
            for (int j=0;j<matrix[i].length;j++){
                res[matrix.length-i-1][j] = matrix[i][j];
            }
        }
        return res;
    }

    public static void main(String[] args) {

    }
}
